package com.easy.service;

import com.easy.bean.User;
import com.easy.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service("testS")
public class TestService {
    @Autowired
    UserDao userD;
    @Autowired
    EasyService easyS;
  @Transactional(propagation = Propagation.REQUIRED)
    public void testa(){
        User user=new User();
        user.setUsername("test");
        userD.add(user);
        easyS.easy();
    }

}
